SCPositionDialog
TheSCPositionDialog
function helps you to position a dialog box on the screen.
pascal ComponentResult SCPositionDialog (ComponentInstance ci, short id, Point *where);
ci
- Identifies your application's connection to a standard image-compression dialog component.
id
- Specifies the resource number of a
'DLOG'
resource. TheSCPositionDialog
function positions the dialog box that corresponds to this resource.where
- Contains a pointer to a point in global coordinates identifying the desired location of the upper-left corner of the dialog box. This parameter allows you to indicate how you want to position the dialog box on the screen.
- The standard image-compression dialog component supports two special values for this parameter. If you set this parameter to (-1,-1), the component places the dialog box on the display device that has the menu bar. The component centers the dialog box horizontally on that device. The component vertically positions the dialog box so that 1/3 of the vertical space that is not used by the box remains above the box, and the remaining 2/3 of the unused space is below the box.
- If you set this parameter to (-2,-2), the component places the dialog box on the display device that supports the highest color or gray scale resolution. The component positions the dialog box as it does for the other special value. This option displays images most clearly and is the recommended value for most cases.
- The
SCPositionDialog
function adjusts the coordinates of this point to correspond to the upper-left corner of the dialog box.DESCRIPTION
You indicate where you want to put the dialog box by specifying the desired coordinates of the upper-left corner of the box. The component then derives appropriate location information for the dialog box based upon its size and the display characteristics of the destination device, and returns that location information to your program. You can then pass that information to the Dialog Manager when you want to display the dialog box.RESULT CODES
Resource Manager errors
paramErr -50 Invalid parameter specified
Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help